<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAkbusWorkflowLogTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('akbus_workflow_log', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('apply_key')->nullable()->comment('申请单key');
            $table->integer('apply_id')->nullable()->comment('申请单ID');
            $table->integer('node_id')->nullable()->comment('当前所处工作流节点ID');
            $table->integer('status')->nullable()->comment('当前状态');
            $table->string('result_name')->nullable()->comment('审批结果名称');
            $table->string('reason', 500)->nullable()->comment('操作理由');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('akbus_workflow_log');
    }
}
